const dataBase = require('./base.js')

export function selectPrev(){
	return dataBase.dataBase.filter( (im) => {
		return im.AREACODE.length == 2
	} )
}

export function selectCity(){
	return dataBase.dataBase.filter( (im) => {
		return im.AREACODE.length == 4
	})
}

export function selectArea(){
	return dataBase.dataBase.filter( (im) => {
		return im.AREACODE.length == 6
	})
}

export function selectNumCtiy(num){
	return selectCity().filter( (im) => {
		return im.AREACODE.substring(0, 2) == num
	})
}

export function selectNumArea(num){
	return selectArea().filter( (im) => {
		return im.AREACODE.substring(0, 4) == num
	})
}